# Nginx

FROM            10.0.16.125:5080/general/centos:7
MAINTAINER      Lijc lijc@siccs.cn
# install rpm
RUN             yum install -y nginx
# import nginx config file
RUN             rm -f /etc/nginx/nginx.conf
ADD             nginx.conf /etc/nginx/
RUN             sed -i '/^daemon/d' /etc/nginx/nginx.conf
# create persistent volume directory
RUN             mkdir /opt/pv
RUN             mv /var/log/nginx /opt/pv/nginx_log
RUN             mv /usr/share/nginx/html /opt/pv/nginx_html
RUN             ln -s /opt/pv/nginx_log /var/log/nginx
RUN             ln -s /opt/pv/nginx_html /usr/share/nginx/html
# import docker entry script
ADD             docker-entrypoint /opt/
RUN             chmod 0755 /opt/docker-entrypoint
EXPOSE          80
CMD             /opt/docker-entrypoint

